package com.prd.controller;

import com.prd.model.EntTaskStage;
import com.prd.service.EntTaskStageService;
import com.prd.util.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "任务分期")
@RestController
@RequestMapping("/api/entTaskStage")
public class EntTaskStageController extends BaseController {

    @Autowired
    private EntTaskStageService entTaskStageService;

    @ApiOperation("查询任务分期列表")
    @GetMapping("list")
    public TableDataInfo list(@ApiParam("任务ID") Long taskId) {
        startPage();
        List<EntTaskStage> list = entTaskStageService.listInfo(taskId);
        return getDataPage(list);
    }
}
